package day11_coll.demo03_Object;
//equals只能用作判断String类型的内容是否相同
//	注意:使用equals时,对象值不能为null
public class demo01 {
    public static void main(String[] args) {
        String s="123";
        String s1="123";
        StringBuilder sb = new StringBuilder("123");
        StringBuilder sb1 = new StringBuilder("123");
        System.out.println(s==s1);
        System.out.println(s.equals(s1));
        System.out.println(s.equals(sb));
        System.out.println(sb.equals(sb1));
    }
}
